package com.fr.meituan;

import java.util.Scanner;

/**
*作者：furong
*日期：2017年6月15日
*时间：下午5:02:13
*/
public class meituan2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long countLow = 1;
        long countHigh = 0;
        for (int i = 0; i < n; i++) {

        }
        long a = Math.round(Math.log(n) / Math.log(2));
        if (countLow == 0) {
            System.out.println(0);
            return;
        }
        if (countHigh == 0) {
            System.out.println(a);
            return;
        }
        int round = -1;
        while (countLow > 0 && countHigh > 0) {
            countLow = Math.round(countLow / 2);
            countHigh = Math.round(countHigh / 2);
            round++;
        }
        if (countHigh == 0) {
            round++;
        }
        System.out.println(round);
    }
    /**
     * Scanner sc = new Scanner(System.in);
            int n = sc.nextInt();
            int ans = 0, x;
            for(int i = 0; i < n; i++){
                for(int j = 0; j < n; j++){
                    x = sc.nextInt();
                    ans += x;
                }
            } 
            System.out.println(ans);
     * */
}
